package com.hsxc.cdz.monitor.bean.pile.v1_21;

import com.hsxc.cdz.base.util.BytesUtil;

//遥信消息
public class SignPileMsg extends PileMessage {

	/*************************************************/
	//对象私有属性
	private int state;   //充电状态
	private int fault;   //错误状态
	private int reserve; //预约状态
	private int plug;    //插头连接状态
	
	/*************************************************/
	//get() and set()
	
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getFault() {
		return fault;
	}

	public void setFault(int fault) {
		this.fault = fault;
	}

	public int getReserve() {
		return reserve;
	}

	public void setReserve(int reserve) {
		this.reserve = reserve;
	}

	public int getPlug() {
		return plug;
	}

	public void setPlug(int plug) {
		this.plug = plug;
	}
	
    /***************************************************/
	//重写父类方法
	@Override
	public void getContentFromByte(byte[] data) {
		byte[] temp;
        temp = BytesUtil.getByte(0,1,data);
        this.setState(BytesUtil.bytesToIntSeq(temp));
        
        temp = BytesUtil.getByte(1,1,data);
        this.setFault(BytesUtil.bytesToIntSeq(temp));
        
        temp = BytesUtil.getByte(2,1,data);
        this.setReserve(BytesUtil.bytesToIntSeq(temp));
        
        temp = BytesUtil.getByte(3,1,data);
        this.setPlug(BytesUtil.bytesToIntSeq(temp));
	}


}
